/**
 * @description  场外基金指令(基金简称)
 * @author shenhong
 */
import React, { PureComponent } from 'react';
import { Row, Col } from 'antd';
import { NoDataMaskC } from '../../../../comps';
import style from '../index.less';
class FundInfo extends PureComponent {
  constructor() {
    super();
    this.state = {
      currentUser: {}, // 当前登录用户信息
    };
  }

  // 展示内容
  showContent = () => {
    const { info } = this.props;
    return (
      <div className={style.fundInfo} style={{ position: 'relative' }}>
        <div>
          <Row>
            <Col span={4} style={{ textAlign: 'right' }}>
              <span>基金全称：</span>
            </Col>
            <Col span={12} style={{ textAlign: 'left' }}>
              <span>{`${info && info.chiname ? info.chiname : '--'}`}</span>
            </Col>
          </Row>
          <Row>
            <Col span={4} style={{ textAlign: 'right' }}>
              <span>基金管理人：</span>
            </Col>
            <Col span={8} style={{ textAlign: 'left' }}>
              <span>{`${info && info.managementcom ? info.managementcom : '--'}`}</span>
            </Col>
            <Col span={4} style={{ textAlign: 'right' }}>
              <span>基金托管人：</span>
            </Col>
            <Col span={8} style={{ textAlign: 'left' }}>
              <span>{`${info && info.jjtgr ? info.jjtgr : '--'}`}</span>
            </Col>
          </Row>
          <Row>
            <Col span={4} style={{ textAlign: 'right' }}>
              <span>基金代码：</span>
            </Col>
            <Col span={8} style={{ textAlign: 'left' }}>
              <span>{`${info && info.tradingcode ? info.tradingcode : '--'}`}</span>
            </Col>
            <Col span={4} style={{ textAlign: 'right' }}>
              <span>基金类型：</span>
            </Col>
            <Col span={8} style={{ textAlign: 'left' }}>
              <span>{`${info && info.fundtype ? info.fundtype : '--'}`}</span>
            </Col>
          </Row>
          <Row>
            <Col span={4} style={{ textAlign: 'right' }}>
              <span>投资方式：</span>
            </Col>
            <Col span={8} style={{ textAlign: 'left' }}>
              <span>{`${info && info.secucategorycodeii ? info.secucategorycodeii : '--'}`}</span>
            </Col>
            <Col span={4} style={{ textAlign: 'right' }}>
              <span>投资类型：</span>
            </Col>
            <Col span={8} style={{ textAlign: 'left' }}>
              <span>{`${info && info.fundtypeself ? info.fundtypeself : '--'}`}</span>
            </Col>
          </Row>
          <Row>
            <Col span={4} style={{ textAlign: 'right' }}>
              <span>交易币种：</span>
            </Col>
            <Col span={8} style={{ textAlign: 'left' }}>
              <span>{`${info && info.cur ? info.cur : '--'}`}</span>
            </Col>
            <Col span={4} style={{ textAlign: 'right' }}>
              <span>交易市场：</span>
            </Col>
            <Col span={8} style={{ textAlign: 'left' }}>
              <span>{`${info && info.exchangename ? info.exchangename : '--'}`}</span>
            </Col>
          </Row>
          <Row>
            <Col span={4} style={{ textAlign: 'right' }}>
              <span>发行日期：</span>
            </Col>
            <Col span={8} style={{ textAlign: 'left' }}>
              <span>{`${info && info.startdate ? info.startdate : '--'}`}</span>
            </Col>
          </Row>
        </div>
        {info !== undefined ? null : <NoDataMaskC height={'100%'} title='请选择基金代码，加载数据' />}
      </div>
    );
  };

  render() {
    return <div>{this.showContent()}</div>;
  }
}

export default FundInfo;
